Calibration2 = Widget.extend({
	ctor:function(){
		this._super();
		this.init();
		this.setTag(TAG_CALIBRATION_BOTTLE2);
	},
	init:function(){
		this.body=new Button(this,10,TAG_CALIBRATION2,"#equitment/Calibration2.png",this.callback);
		var calibration_lib=new Button(this,11,TAG_LIB3,"#equitment/Calibration_lib.png",this.callback);
		calibration_lib.setPosition(cc.p(0, this.body.height*0.40));
	},
	openLib:function(){
		var ber = cc.bezierBy(1.5,[cc.p(50,70),cc.p(60,-70),cc.p(60,-75)]);
		var rotate = cc.rotateTo(1.5, 180);
		var spawn = cc.spawn(ber, rotate);
		var seq = cc.sequence(spawn,cc.callFunc(function() {
			this.getChildByTag(TAG_LIB3).setRotation(0);
			this.getChildByTag(TAG_LIB3).setSpriteFrame("equitment/Calibration_lib1.png");
			gg.flow.next();
		},this));
		this.getChildByTag(TAG_LIB3).runAction(seq);
	},
	callback:function(p){
		var func = cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_LIB3:
			this.openLib();
			break;
		case TAG_CALIBRATION2:
			this.body.runAction(cc.sequence(cc.moveBy(1,cc.p(-gg.c_width*0.23+30,35)),cc.spawn(cc.rotateTo(1,-85),func),cc.rotateTo(3,0),cc.callFunc(function() {
				var Calibration=ll.run.getChildByTag(TAG_CALIBRATION_BOTTLE2);
				Calibration.setVisible(false);
				p.removeFromParent(true);
				gg.flow.next();
			},this)));
			break;


		default:
			break;
		}
	},
	actionDone:function(p){
		switch(p.getTag()){
		case TAG_CALIBRATION2:
			var beaker=ll.run.getChildByTag(TAG_BEAKER6);
			beaker.upLine();
			break;
		default:
			break;
		}
	}
});
